package com.simple.card.controller;

import com.simple.card.enums.ResultEnum;
import com.simple.card.exception.CreditException;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloController {

    @GetMapping("/test")
    public String hello() {
        if( 1 == 1) {
            throw new CreditException(ResultEnum.PARAM_ERROR);
        }
        return null;
    }
}
